<?php include_once 'include/func.class.php';?>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?php 
$div=$_GET['div'];
switch($div){
	case 'employee':
?>
<?php 
$id=$_REQUEST['id'];
$row = mysql_fetch_array(mysql_query("select * from employee where id=$id"));
?>
<div id="employee_window">
  <div id="graybga"></div>
  <div class="class_list" id="class_list">
    <div class="window_header"><span class="window_title">Employee</span><span class="window_close"><a href="javascript:hidden_window()"></a></span></div>
    <div style="border-bottom:#CCC 1px dashed; height:1px;"></div>
    <div class="bktop" style="padding-left:51px;">
      <form action="<?php echo $div?>.php" method="post" name="form_w" id="form_w">
        <table width="100%" border="0" cellspacing="0" cellpadding="0" class="full_add_table">
          <tr>
            <td height="35" align="right">Name:</td>
            <td ><input name="e_name" type="text" class="input_title_bg" value="<?php echo $row['e_name']?>" />
              <span class="red">*</span></td>
          </tr>
          <tr>
            <td height="35" align="right">Birthday：</td>
            <td ><input type="text" name="e_birthday" id="e_birthday" value="<?php echo date("Y-m-d",$row['e_birthday'])?>"  onfocus="WdatePicker({el:$dp.$('e_birthday')})" class="input_title_bg"/>
              <span class="red">*</span></td>
          </tr>
          <tr>
            <td height="35" align="right">Phone Number：</td>
            <td ><input name="e_tel" type="text" class="input_title_bg"  value="<?php echo $row['e_tel']?>"/>
              <span class="red">*</span></td>
          </tr>
          <tr>
            <td height="35" align="right">Work time：</td>
            <td ><input type="text" name="e_jtime" id="e_jtime" value="<?php echo date("Y-m-d",$row['e_jtime'])?>"  onfocus="WdatePicker({el:$dp.$('e_jtime')})" class="input_title_bg"/>
              <span class="red">*</span></td>
          </tr>
        </table>
        <div class="gray_add_bottom">
          <input type="submit" class="blue_submit_btn" style="margin-right:15px;" value="" />
          <input type="button" class="blue_back_btn" onclick="history.go(-1)" value=""  />
          <input name="action" type="hidden" id="action" value="<?php echo $id==''?'add':'edit'; ?>" />
          <input name="id" type="hidden" value="<?php echo $id?>" />
        </div>
      </form>
    </div>
  </div>
</div>
<?php break;
      case 'product':
?>
<?php 
$id=$_REQUEST['id'];
$row = mysql_fetch_array(mysql_query("select * from product where id=$id"));
?>
<div id="product_window">
  <div id="graybga"></div>
  <div class="class_list" id="class_list">
    <div class="window_header"><span class="window_title">Product</span><span class="window_close"><a href="javascript:hidden_window()"></a></span></div>
    <div style="border-bottom:#CCC 1px dashed; height:1px;"></div>
    <div class="bktop" style="padding-left:51px;">
      <form action="<?php echo $div?>.php" method="post" name="form_w" id="form_w">
        <table width="100%" border="0" cellspacing="0" cellpadding="0" class="full_add_table">
          <tr>
            <td height="35" align="right">Name：</td>
            <td ><input name="title" type="text" class="input_title_bg" value="<?php echo $row['title']?>" />
              <span class="red">*</span></td>
          </tr>
          <tr>
            <td height="35" align="right">Price：</td>
            <td ><input name="price" type="text"  class="input_title_bg" value="<?php echo $row['price']?>"/>
              <span class="red">*</span></td>
          </tr>
          <tr>
            <td height="35" align="right">Recount：</td>
            <td ><input name="recount" type="text" class="input_title_bg"  value="<?php echo $row['recount']?>"/>
              <span class="red">*</span></td>
          </tr>
        </table>
        <div class="gray_add_bottom">
          <input type="submit" class="blue_submit_btn" style="margin-right:15px;" value="" />
          <input type="button" class="blue_back_btn" onclick="history.go(-1)" value=""  />
          <input name="action" type="hidden" value="<?php echo $id==''?'add':'edit'; ?>" />
          <input name="id" type="hidden" value="<?php echo $id?>" />
        </div>
      </form>
    </div>
  </div>
</div>
<?php break;
      case 'account':
?>
<?php 
$id=$_REQUEST['id'];
$row = mysql_fetch_array(mysql_query("select * from $div where id=$id"));
?>
<div id="<?php echo $div?>_window">
  <div id="graybga"></div>
  <div class="class_list" id="class_list">
    <div class="window_header"><span class="window_title">Account</span><span class="window_close"><a href="javascript:hidden_window()"></a></span></div>
    <div style="border-bottom:#CCC 1px dashed; height:1px;"></div>
    <div class="bktop" style="padding-left:51px;">
      <form action="<?php echo $div?>.php" method="post" name="form_w" id="form_w">
        <table width="100%" border="0" cellspacing="0" cellpadding="0" class="full_add_table">
          <tr>
            <td height="35" align="right">Name:</td>
            <td ><input name="title" type="text" class="input_title_bg" value="<?php echo $row['title']?>" />
              <span class="red">*</span></td>
          </tr>
          <tr>
            <td height="35" align="right">Price:</td>
            <td ><input name="price" type="text" class="input_title_bg"  value="<?php echo $row['price']?>"/>
              <span class="red">*</span></td>
          </tr>
        </table>
        <div class="gray_add_bottom">
          <input type="submit" class="blue_submit_btn" style="margin-right:15px;" value="" />
          <input type="button" class="blue_back_btn" onclick="history.go(-1)" value=""  />
          <input name="action" type="hidden" value="<?php echo $id==''?'add':'edit'; ?>" />
          <input name="id" type="hidden" value="<?php echo $id?>" />
        </div>
      </form>
    </div>
  </div>
</div>
<?php break;
      case 'member':
?>
<?php 
$id=$_REQUEST['id'];
$row = mysql_fetch_array(mysql_query("select * from member where id=$id"));
?>
<div id="member_window">
  <div id="graybga"></div>
  <div class="class_list" id="class_list">
    <div class="window_header"><span class="window_title">Member</span><span class="window_close"><a href="javascript:hidden_window()"></a></span></div>
    <div style="border-bottom:#CCC 1px dashed; height:1px;"></div>
    <div class="bktop" style="padding-left:51px;">
      <form action="<?php echo $div?>.php" method="post" name="form_w" id="form_w">
        <table width="100%" border="0" cellspacing="0" cellpadding="0" class="full_add_table">
          <tr>
            <td height="35" align="right">Name:</td>
            <td ><input name="m_name" type="text" class="input_title_bg" value="<?php echo $row['m_name']?>" />
              <span class="red">*</span></td>
          </tr>
          <tr>
            <td height="35" align="right">Birthday:</td>
            <td ><input name="m_birthday" type="text"  class="input_title_bg" id="m_birthday" value="<?php echo date('Y-m-d',$row['m_birthday'])?>" onfocus="WdatePicker({el:$dp.$('m_birthday')})"/>
              <span class="red">*</span></td>
          </tr>
          <tr>
            <td height="35" align="right">Phone Number:</td>
            <td ><input name="m_tel" type="text" class="input_title_bg"  value="<?php echo $row['m_tel']?>"/>
              <span class="red">*</span></td>
          </tr>
        </table>
        <div class="gray_add_bottom">
          <input type="submit" class="blue_submit_btn" style="margin-right:15px;" value="" />
          <input type="button" class="blue_back_btn" onclick="history.go(-1)" value=""  />
          <input name="action" type="hidden" value="<?php echo $id==''?'add':'edit'; ?>" />
          <input name="id" type="hidden" value="<?php echo $id?>" />
        </div>
      </form>
    </div>
  </div>
</div>
<?php break;
      case 'webconfig':
	  $row = mysql_fetch_array(mysql_query("select * from webconfig"));
?>
<div id="<?php echo $div?>_window">
  <div id="graybga"></div>
  <div class="class_list" id="class_list">
    <div class="window_header"><span class="window_title">Member</span><span class="window_close"><a href="javascript:hidden_window()"></a></span></div>
    <div style="border-bottom:#CCC 1px dashed; height:1px;"></div>
    <div class="bktop" style="padding-left:51px;">
      <form action="checkall.php" method="post" name="form_w" id="form_w">
        <table width="100%" border="0" cellspacing="0" cellpadding="0" class="full_add_table">
          <tr>
            <td height="35" align="right">管理账号：</td>
            <td ><input name="username" type="text" class="input_title_bg" value="<?php echo $_SESSION['admin']?>" />
              <span class="red">*</span></td>
          </tr>
          <tr>
            <td height="35" align="right">管理密码：</td>
            <td ><input name="password" type="password"  class="input_title_bg" />
              <span class="red">*不修改侧留空</span></td>
          </tr>
          <tr>
            <td width="25%" height="35" align="right">系统名称：</td>
            <td width="75%"><input type="text" name="webname" id="webname" value="<?php echo $row['webname']; ?>" class="class_input" /></td>
          </tr>
          <tr>
            <td width="25%" height="35" align="right">关键字设置：</td>
            <td width="75%"><input type="text" name="keyword" id="keyword" value="<?php echo $row['keyword']; ?>" class="class_input" /></td>
          </tr>
          <tr>
            <td width="25%" height="116" align="right">系统描述：</td>
            <td width="75%"><textarea name="description" id="description" class="class_areatext"><?php echo $row['description']; ?></textarea></td>
          </tr>
          <tr>
            <td width="25%" height="116" align="right">页底信息：</td>
            <td width="75%"><textarea name="copyright" id="copyright" class="class_areatext"><?php echo $row['copyright']; ?></textarea></td>
          </tr>
        </table>
        <div class="gray_add_bottom">
          <input type="submit" class="blue_submit_btn" style="margin-right:15px;" value="" />
          <input type="button" class="blue_back_btn" onclick="history.go(-1)" value=""  />
          <input name="action" type="hidden" value="editcon" />
        </div>
      </form>
    </div>
  </div>
</div>
<?php break;
}
?>
